package com.whmall.service.crm.enumeration;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 客户池跟进类型
 *
 * @author Esion
 * @since 2022/6/21
 */
@RequiredArgsConstructor
@Getter
public enum CustomerPoolFollowTypeEnum {

    DEFAULT(0, "未知客户池跟进类型"),
    CUSTOMER_FOLLOW(101, "客户跟进"),
    DAILY_FOLLOW(201, "日常跟进"),
    MAINTENANCE_PLAN_FIRST_MILLION(202, "维护-首单万元"),
    MAINTENANCE_PLAN_LEVEL_CHANGE(203, "维护-级别变更"),
    IMPROVEMENT_STRATEGY(204, "改进策略");

    private final Integer value;

    private final String name;

    public static CustomerPoolFollowTypeEnum getByValue(Integer value) {
        for (CustomerPoolFollowTypeEnum item : values()) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return DEFAULT;
    }

}
